$.extend($.fn.validatebox.defaults.rules, {
	equals : {
		validator : function(value, param) {
			return value.length >= param[0] && value.length <= param[1];
		},
		message : '用户名因该为2-5个字符之间'
	},
	passwordinput : {
		validator : function(value, param) {
			return value.length == param[0];
		},
		message : '密码必须为6个字符'
	}
});

$.extend($.fn.datagrid.defaults.editors, {    
    datetimebox: {    
        init: function(container, options){    
            var box = $('<input type="text" >').appendTo(container);    
            box.datetimebox(options);
            return box;    
        },    
        getValue: function(target){    
            return $(target).datetimebox('getValue');    
        },    
        setValue: function(target, value){    
            $(target).datetimebox('setValue',value);    
        },    
        resize: function(target, width){    
            var box = $(target);    
            box.datetimebox('resize',width);
            
        }   ,
        destroy:function(target){
        	 $(target).datetimebox('destroy');
        }
    }    
});  